Tags: mysql slow querySome settings for MySQL slow query1) Check to see if MySQL turns on slow query logShow variables like ' Slow_query_log ';2) Set non-indexed records to slow query logset global log_queries_not_using_indexes=on;3) See how long SQL is logged to the slow query logShow variables like ' Long_query_time '4) Turn on slow query logSet global Slow_query_log=on5) View the log record locationShow
@echo offREM This script is designed to complete Nginx Service log scrollingREM Nginx working directorySet Workspace=d:\niis\nginxREM Log storage DirectorySet Logdir=d:\niis\nginx\logsREM view of Nginx processes running in the systemrem tasklist/fi "imagename eq nginx.exe"REM Log storage path. The directory structure of the saved log is: Year \ month \ DaySet rolldir=%logdir%\%date:~0,4%\%date:~5,2%\%date:~8,2%Set MDROLLDIR=MD%rolldir%Call%mdrolldir%REM Backup and rename access log files based o
(' username ', ' $username ', Time () +31536000, '/');Setcookie (' Logset ', ' OK ', Time () +31536000, '/');
Reply content:
Error message:Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 9
Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login
"trust" to "trust" "10.10.3.1/24" "10.10.2.1/24" "any" denylogSet Policy ID 34Then configure the Untrust-trust access policy, independent of each other, to do their own security policy can:Set policy ID of "utrust" to "Trust" "Any" "10.10.2.1/24" "any" Deny logSet Policy ID 36Set policy ID PNS from "utrust" to "Trust" "Any" "10.10.3.1/24" "any" Deny logSet Policy ID 37This article from "from Zero to One" b
Sometimes you might want to turn on the log without restarting MySQL.
Of course we can open it via MySQL SQL query.
The following actions assume that you have logged in as root into the MySQL interactive interface
General Log
# View General Log ConfigurationShow VARIABLES like ' general_log% ';Let's start him down.
# Set log file path, make sure the path exists firstSET GLOBAL general_log_file= '/var/log/mysql/general_mysql.log ';# Turn on the logSET
Tags: iges rom optimizer sql str from tab BLE logDifferent versions of MySQL optimizer have a certain difference+ View Database versionSELECT @ @version;+ View the database being usedSelect Database ();+ See if MySQL turns on slow query logShow variables like ' Slow_query_log ';+ turn on MySQL slow query logSet global slow_query_log=on;+ Set the file location where the MySQL slow query log is storedSet global slow_query_log_file= '/home/mysql/sql_log/
permissionschmod 755 express_monit.shInstall Monit, preferably using RPM installation, using encoding package compilation problemYum Install-y MonitEditing a configuration fileVim/etc/monit.confModify the check time to 3 seconds and ID file path and open logSet Daemon 3 # Check services at 2-minute intervals# set logfile syslog facility Log_daemonSet Logfile/var/log/monit.logSet Idfile/var/.monit.idSet Statefile/var/.monit.stateComment Bottom Line 3
When the system performance reaches the bottleneck, it is necessary to find out those operations on the performance impact of the system is relatively large, here you can use the database slow query log function to record some more time-consuming data can be manipulated to determine where the need for optimization.Here are some common commands for using slow query logs1. To see if the slow query log is turned on:Show variables like '%slow% ';2, set up queries that do not use indexes to log inSet
find the log in the/usr/tmp directory.2. INV LogSet profile3. RCV log--in patch 9184617:r12. PO. After a, the RCV log is printed in the Inv log. So as long as the R12 set the Inv and RCV profile, you can get RCV log inside the Inv log.4. SQL TraceCan be set on the form interface, but this can only be collected to SQL on the form interface, and subsequent calls to the concurrent use of SQL is not collected.To collect all of the SQL Trace, set the foll
================================================:: Remove the current time in "YYYYMMDD" format.Set backupdate=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%:: Create a backup directory.If not exist "D:\backup\data" mkdir D:\backup\dataIf not exist "D:\backup\log" mkdir D:\backup\logSet Datadir=d:\backup\dataSet Logdir=d:\backup\logExp userid= ' username/password @sid ' file=%datadir%\data_%backupdate%.dmp log=%logdir%\log_%backup
@echo offEcho ================================================Automated backup scripts for Oracle databases in the Echo Windows environmentEcho 1. Use the current date to name the backup file.Echo 2. Automatically delete backups up to 7 days ago.Echo ================================================:: Remove the current time in "YYYYMMDD" format.Set backupdate=%date:~0,4%%date:~5,2%%date:~8,2%:: Set the user name, password, and database to be backed up.Set User=xxxSet password=123456Set Database=
directories.Dirmessage_enable = YESSet to enable the directory flag function.Xferlog_enable = YESEnable logging.Connect_from_port_20 = YESSet port 20 for data connection.Chown_uploads = NOSets the upload prohibition file to change the host.Xferlog_file =/var/log/vsftpd. logSet the path for saving service logs for centos vsftpd. Note: This file does not exist by default. You must manually touch it out, and because the service host user with Vsftpd cha
Collect three kinds of logs herePHP error log, php-fpm error log and slow query logSet in php.iniError_log =/data/app_data/php/logs/php_errors.logSet in php-fpm.confError_log =/data/app_data/php/logs/php-fpm_error.logSlowlog =/data/app_data/php/logs/php-fpm_slow.logThe PHP error log is as follows:[29-jan-201507:37:44utc]phpwarning:phpstartup:unableto loaddynamiclibrary '/data/app_platform/php/lib/php/extensions/no-debug-non-zts-20100525 /redis.so ' -/
modified by default using PHP. ini in the Windows directory, and then read the files in the easyphp \ Apach directory.
Rem copied checkin. php and renamed it checkin_svn.php. If there is a Chinese transmission, you need to modify checkin_svn.php.Added the capture function $ t_comment = mb_convert_encoding ($ t_comment, "UTF-8", "gb2312 ");The position of the REM modification is in front of "foreach ($ t_issues as $ t_issue_id) {".Rem mb_convert_encoding this function requires extension file p
Today we found a lightweight tool that is much lighter than cacti and nagios ....Very simple installationhttp://mmonit.com/monit/Configure the file to run after decompression.Vim/etc/monitrcSet Daemon #check service at secondSet Logfile/var/log/monit.log #save LogSet Pidfile/var/run/monit.pid #pid fileSet mailserver localhost #primary mail server #--8 #set mail-format { # from: [emailprotected] $HOST # subject:monit alert-- $EVENT $SERVICE # messag
to all specified log files.Note: Using several error log directives at the same level are supported in NGINX versions 1.5.2 and greater.Note: To use multiple error logs at the same layer, the Nginx version must be 1.5.2 or later.Setting Up the Access LogSet access logsTo the access a log, NGINX writes information about client requests after the request is processed. by default, the access log is located at logs/access. log, and the information is wri
value is 60.Data _ connection_timeout = 120Set the timeout time for establishing an FTP data connection, in seconds. The default value is 120.Idle_session_timeout = 300If you do not perform any operation on the FTP server for a specified period of time, the FTP connection is disconnected, in seconds. The default value is 300.
11. Log File SettingsXferlog_enable = YES/NO (YES)Whether to enable upload/download logging. If enabled, the upload and download information is recorded in the file define
General_log is turned off by default, and when Root is on, General_log_file will save all query statementsSo you can open General_log, then set General_log_file as a PHP file, and finally use a word trojan to query to get WebshellExecute SQL statement at SQL office after entering phpMyAdminFirst check to see if the general log is openShow variables like ' General_log ';General log is off state, execute SQL statement Open general logSet global general_
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.